<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址：https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------

namespace app\admin\validate\order;


use think\Validate;

/**
 * 订单验证
 * Class Order
 * @package app\validate\order
 */
class Order extends Validate
{


    protected $rule = [
        'id' => 'require|integer|gt:0',
        'type' => 'require|in:1,2,3',
        'remark' => 'requireIf:type,2|requireIf:type,3',
        'unboxing_video' => 'require',
        'consult_money' => 'requireIf:type,3|number'
    ];

    protected $message = [
        'type' => 'validate_order_check.type_require',
        'remark.requireIf' => 'validate_order_check.remark_require_if',
        'consult_money.requireIf' => 'validate_order_check.consult_money_require_if',
        'unboxing_video.require' => 'validate_order_check.unboxing_video_require',

    ];

    protected $scene = [
        'check' => ['id', 'type', 'remark', 'unboxing_video','consult_money'],

    ];





}
